<html>
<head><meta charset="utf-8"><title>cargo dev bless clippy#5394 · clippy · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/index.html">clippy</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html">cargo dev bless clippy#5394</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="221405317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221405317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Phil H <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221405317">(Jan 02 2021 at 16:01)</a>:</h4>
<p>I'm currently a bit stuck here, mostly because running/compiling <code>cargo dev bless</code> doesn't seem to set <code>OUT_DIR</code> at all. According to cargo docs, the presence of a <code>build.rs</code>file sets it automatically, but that doesn't seem to happen and it's not set</p>



<a name="221405361"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221405361" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Phil H <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221405361">(Jan 02 2021 at 16:02)</a>:</h4>
<p>Just 'rambling' along here, while I'm working on it, not specifically asking for help for now <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="221405392"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221405392" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Phil H <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221405392">(Jan 02 2021 at 16:03)</a>:</h4>
<p>I suspect, once I manage to have <code>OUT_DIR</code> set by cargo, it will still point to a different directory, than the <code>OUT_DIR</code> value for the clippy ui tests</p>



<a name="221405442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221405442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> flip1995 <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221405442">(Jan 02 2021 at 16:04)</a>:</h4>
<p>Just an idea: maybe <code>OUT_DIR</code> is only set during testing and therefore it isn't set when running <code>cargo dev bless</code>?</p>



<a name="221405518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221405518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> flip1995 <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221405518">(Jan 02 2021 at 16:06)</a>:</h4>
<p>So <code>x.py</code> sets the <code>OUT_DIR</code> var during testing.</p>



<a name="221405521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221405521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Phil H <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221405521">(Jan 02 2021 at 16:06)</a>:</h4>
<p>ohh</p>



<a name="221405525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221405525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Phil H <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221405525">(Jan 02 2021 at 16:06)</a>:</h4>
<p>I somehow missed that! Thanks, I will take a look</p>



<a name="221405529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221405529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> flip1995 <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221405529">(Jan 02 2021 at 16:06)</a>:</h4>
<p>That's just a guess though. Haven't looked it up.</p>



<a name="221416457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221416457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Phil H <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221416457">(Jan 02 2021 at 20:42)</a>:</h4>
<p>Ok, the <code>OUT_DIR</code> for <code>clippy_dev</code> is indeed different from the <code>OUT_DIR</code> of the tests</p>



<a name="221416815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221416815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Phil H <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221416815">(Jan 02 2021 at 20:53)</a>:</h4>
<p>I see three options now:</p>
<ol>
<li>Use something other than the OUT_DIR</li>
<li>Traverse up ~2 directories from OUT_DIR and create our own fake OUT_DIR to put the test results in</li>
<li>Maybe turning Clippy into a workspace fixes it? But that might break other things <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></li>
</ol>



<a name="221416899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221416899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Phil H <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221416899">(Jan 02 2021 at 20:55)</a>:</h4>
<p>I will try 2) tomorrow, it seems like the easiest way, even though it might be a bit hacky.<br>
My current <code>OUT_DIR</code> for <code>clippy_dev</code> in rustc is:<br>
<code>/code/rust/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/build/clippy_dev-039e5097828718a7/out</code><br>
so traversing up 2 directories and creating our own might work</p>



<a name="221417241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221417241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Phil H <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221417241">(Jan 02 2021 at 21:04)</a>:</h4>
<p>Another option would be to add bless support to our compiletest version, so we wouldn't have to maintain our own bless support in <code>clippy_dev</code> - in retrospect I probably should have done that instead <span aria-label="neutral" class="emoji emoji-1f610" role="img" title="neutral">:neutral:</span><br>
I opened an issue in compiletest-rs: <a href="https://github.com/laumann/compiletest-rs/issues/228">https://github.com/laumann/compiletest-rs/issues/228</a></p>



<a name="221425353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221425353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221425353">(Jan 03 2021 at 00:32)</a>:</h4>
<p><span class="user-mention silent" data-user-id="197894">Philipp Hansch</span> <a href="#narrow/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394/near/221417241">said</a>:</p>
<blockquote>
<p>Another option would be to add bless support to our compiletest version</p>
</blockquote>
<p>Related to this, I think it would be interesting for us to have <code>compiletest</code> bundled in <code>rustc-dev</code> if that's possible as <code>compiletest-rs</code> seems to be unmaintained. IIRC an attempt to extract it from the rustc repo as an external crate in <a href="http://crates.io">crates.io</a> failed, and I would say that path is less relevant now that <code>trybuild</code> exists.</p>
<p>For us though, <code>trybuild</code> lacks some features (rustfix, header commands, not running <code>pass</code> files,  <code>check-pass</code> support, to name a few). I'm not sure if it would make sense to try to implement them since the crate tries to be minimalist by design.</p>
<p>Integration with cargo is the most interesting feature <code>trybuild</code> would have for us, so that would remain unaddressed if we stick with compiletest. </p>
<p>Anyway, does this proposal make sense? Sorry for hijacking the thread but I've been thinking about this for a while and had to spit it out <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="221425998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221425998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221425998">(Jan 03 2021 at 00:53)</a>:</h4>
<p><span class="user-mention" data-user-id="279272">@Eduardo Broto</span> why use it precompiled instead of a git dependency on rust-lang/rust? That wouldn't need support from the intra team</p>



<a name="221426044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221426044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221426044">(Jan 03 2021 at 00:54)</a>:</h4>
<p>The hard part is turning it into a library instead of a binary, but you'd have to do that anyway</p>



<a name="221426711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221426711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221426711">(Jan 03 2021 at 01:14)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394/near/221425998">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="279272">Eduardo Broto</span> why use it precompiled instead of a git dependency on rust-lang/rust? That wouldn't need support from the intra team</p>
</blockquote>
<p>Oh, I didn't know you can pick a specific workspace member as a git dependency instead of the full repo. That could be an option although IIUC the in-tree version of Clippy would also fetch a full copy of rust-lang/rust, which seems a bit overkill at first sight.</p>



<a name="221427651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221427651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221427651">(Jan 03 2021 at 01:41)</a>:</h4>
<p>Well, it wouldn't have to fetch llvm which should speed it up a lot</p>



<a name="221427693"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221427693" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221427693">(Jan 03 2021 at 01:42)</a>:</h4>
<p>But yeah it would be good to check how big .git is for rust-lang/rust itself</p>



<a name="221431296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221431296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221431296">(Jan 03 2021 at 03:33)</a>:</h4>
<p>a clone downloads 575 mb of data<br>
after extraction, the .git dir is 616 mb<br>
but there's a lot of badly compressed/unneeded crap in there, if you recompress, you end up with only  260 mb in your .git<br>
(so cloning could actually be almost twice as fast but github does not care)</p>



<a name="221431356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221431356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221431356">(Jan 03 2021 at 03:35)</a>:</h4>
<p>is there a way to tell github 'get rid of unreachable commits'?</p>



<a name="221431431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221431431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221431431">(Jan 03 2021 at 03:38)</a>:</h4>
<p>delete the repo and re-push? /s<br>
I'm not sure :/</p>



<a name="221431625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221431625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221431625">(Jan 03 2021 at 03:43)</a>:</h4>
<p><a href="https://twitter.com/githubhelp/status/387926738161774592?lang=es">https://twitter.com/githubhelp/status/387926738161774592?lang=es</a></p>
<div class="inline-preview-twitter"><div class="twitter-tweet"><a href="https://twitter.com/githubhelp/status/387926738161774592?lang=es"><img class="twitter-avatar" src="https://pbs.twimg.com/profile_images/818913837034278913/E5R-Rwjp_normal.jpg"></a><p><a href="https://twitter.com/pstadler">@pstadler</a> We run `git gc` at most once per day, triggered automatically by a push.</p><span>- GitHub Support (@GitHubHelp)</span></div></div>



<a name="221431673"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221431673" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221431673">(Jan 03 2021 at 03:44)</a>:</h4>
<p>but even regular <code>git gc</code>s leave a lot to be desired if you don't recompress the repo from scratch from time to time ...</p>



<a name="221440792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221440792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Phil H <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221440792">(Jan 03 2021 at 08:27)</a>:</h4>
<p>Yeah, eventually we should just depend on the same compiletest version as rustc <span aria-label="thumbs up" class="emoji emoji-1f44d" role="img" title="thumbs up">:thumbs_up:</span></p>



<a name="221440797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221440797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Phil H <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221440797">(Jan 03 2021 at 08:27)</a>:</h4>
<p>Oh, I never heard about <code>trybuild</code> until now, that's interesting!</p>



<a name="221440940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/cargo%20dev%20bless%20clippy%235394/near/221440940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Phil H <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/cargo.20dev.20bless.20clippy.235394.html#221440940">(Jan 03 2021 at 08:31)</a>:</h4>
<p>But yeah, <code>trybuild</code> is lacking a lot of features we currently use (edition support, "aux_build", not running tests on specific architechtures, etc)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>